"use strict";
import * as React from 'react';
import { searchStyles } from "../../assets/styles/search";
import MyText from "../../component/MyText";
import Line from "../../component/Line";
import { SCREEN_WIDTH } from "../../constant";
const { View, Image, TouchableOpacity } = require('react-native');
const { connect } = require('react-redux');
class SearchResultItem extends React.Component {
    render() {
        const { avatar, name, sub, detail, onPress } = this.props;
        return (<TouchableOpacity style={searchStyles.itemContainer} onPress={onPress}>
                <Image source={avatar} style={searchStyles.avatar}/>
                <View style={searchStyles.itemLeftContent}>
                    <MyText style={searchStyles.name}>{name}</MyText>
                    <MyText style={searchStyles.sub}>{sub}</MyText>
                    <MyText style={searchStyles.detail}>{detail}</MyText>
                </View>
                <Line style={searchStyles.itemLine} width={SCREEN_WIDTH - 100}/>
            </TouchableOpacity>);
    }
}
export default SearchResultItem;
